3.4.25 \(\int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx\) [325]

Optimal. Leaf size=205 \[ \frac {2 i (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}-\frac {i \, _2F_1\left (1,m;1+m;\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)} \]

[Out]

2*I*(a+I*a*tan(d*x+c))^m/d/(m^2+5*m+6)-1/2*I*hypergeom([1, m],[1+m],1/2+1/2*I*tan(d*x+c))*(a+I*a*tan(d*x+c))^m
/d/m-I*m*tan(d*x+c)^2*(a+I*a*tan(d*x+c))^m/d/(m^2+5*m+6)+tan(d*x+c)^3*(a+I*a*tan(d*x+c))^m/d/(3+m)+I*(m^2+3*m+
6)*(a+I*a*tan(d*x+c))^(1+m)/a/d/(3+m)/(m^2+3*m+2)

________________________________________________________________________________________

Rubi [A]
time = 0.25, antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3641, 3678, 3673, 3608, 3562, 70} \begin {gather*} -\frac {i (a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac {1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (m^2+5 m+6\right )}+\frac {2 i (a+i a \tan (c+d x))^m}{d \left (m^2+5 m+6\right )}+\frac {i \left (m^2+3 m+6\right ) (a+i a \tan (c+d x))^{m+1}}{a d (m+1) (m+2) (m+3)}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (m+3)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^4*(a + I*a*Tan[c + d*x])^m,x]

[Out]

((2*I)*(a + I*a*Tan[c + d*x])^m)/(d*(6 + 5*m + m^2)) - ((I/2)*Hypergeometric2F1[1, m, 1 + m, (1 + I*Tan[c + d*
x])/2]*(a + I*a*Tan[c + d*x])^m)/(d*m) - (I*m*Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^m)/(d*(6 + 5*m + m^2)) + (
Tan[c + d*x]^3*(a + I*a*Tan[c + d*x])^m)/(d*(3 + m)) + (I*(6 + 3*m + m^2)*(a + I*a*Tan[c + d*x])^(1 + m))/(a*d
*(1 + m)*(2 + m)*(3 + m))

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 3562

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[-b/d, Subst[Int[(a + x)^(n - 1)/(a - x), x]
, x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rule 3608

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*(
(a + b*Tan[e + f*x])^m/(f*m)), x] + Dist[(b*c + a*d)/b, Int[(a + b*Tan[e + f*x])^m, x], x] /; FreeQ[{a, b, c,
d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] &&  !LtQ[m, 0]

Rule 3641

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[d*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[1/(a*(m + n - 1)), Int[(a
 + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n - 2)*Simp[d*(b*c*m + a*d*(-1 + n)) - a*c^2*(m + n - 1) + d*(b*d*m
 - a*c*(m + 2*n - 2))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[
a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[n, 1] && NeQ[m + n - 1, 0] && (IntegerQ[n] || IntegersQ[2*m, 2*n])

Rule 3673

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[B*d*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e
 + f*x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b
*c - a*d, 0] &&  !LeQ[m, -1]

Rule 3678

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[B*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^n/(f*(m + n))), x] +
Dist[1/(a*(m + n)), Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n - 1)*Simp[a*A*c*(m + n) - B*(b*c*m + a*
d*n) + (a*A*d*(m + n) - B*(b*d*m - a*c*n))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] &
& NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[n, 0]

Rubi steps

\begin {align*} \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx &=\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}-\frac {\int \tan ^2(c+d x) (a+i a \tan (c+d x))^m (3 a+i a m \tan (c+d x)) \, dx}{a (3+m)}\\ &=-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}-\frac {\int \tan (c+d x) (a+i a \tan (c+d x))^m \left (-2 i a^2 m+a^2 \left (6+3 m+m^2\right ) \tan (c+d x)\right ) \, dx}{a^2 (2+m) (3+m)}\\ &=-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)}-\frac {\int (a+i a \tan (c+d x))^m \left (-a^2 \left (6+3 m+m^2\right )-2 i a^2 m \tan (c+d x)\right ) \, dx}{a^2 (2+m) (3+m)}\\ &=\frac {2 i (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)}+\int (a+i a \tan (c+d x))^m \, dx\\ &=\frac {2 i (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)}-\frac {(i a) \text {Subst}\left (\int \frac {(a+x)^{-1+m}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac {2 i (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}-\frac {i \, _2F_1\left (1,m;1+m;\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 43.49, size = 0, normalized size = 0.00 \begin {gather*} \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[Tan[c + d*x]^4*(a + I*a*Tan[c + d*x])^m,x]

[Out]

Integrate[Tan[c + d*x]^4*(a + I*a*Tan[c + d*x])^m, x]

________________________________________________________________________________________

Maple [F]
time = 0.90, size = 0, normalized size = 0.00 \[\int \left (\tan ^{4}\left (d x +c \right )\right ) \left (a +i a \tan \left (d x +c \right )\right )^{m}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^4*(a+I*a*tan(d*x+c))^m,x)

[Out]

int(tan(d*x+c)^4*(a+I*a*tan(d*x+c))^m,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4*(a+I*a*tan(d*x+c))^m,x, algorithm="maxima")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*tan(d*x + c)^4, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4*(a+I*a*tan(d*x+c))^m,x, algorithm="fricas")

[Out]

integral((2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d*x + 2*I*c) + 1))^m*(e^(8*I*d*x + 8*I*c) - 4*e^(6*I*d*x + 6*I*c) +
6*e^(4*I*d*x + 4*I*c) - 4*e^(2*I*d*x + 2*I*c) + 1)/(e^(8*I*d*x + 8*I*c) + 4*e^(6*I*d*x + 6*I*c) + 6*e^(4*I*d*x
 + 4*I*c) + 4*e^(2*I*d*x + 2*I*c) + 1), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{m} \tan ^{4}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**4*(a+I*a*tan(d*x+c))**m,x)

[Out]

Integral((I*a*(tan(c + d*x) - I))**m*tan(c + d*x)**4, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4*(a+I*a*tan(d*x+c))^m,x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*tan(d*x + c)^4, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\mathrm {tan}\left (c+d\,x\right )}^4\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^m \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^4*(a + a*tan(c + d*x)*1i)^m,x)

[Out]

int(tan(c + d*x)^4*(a + a*tan(c + d*x)*1i)^m, x)

________________________________________________________________________________________